{extend name="public/base"}

{block name="main"}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 文章列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="Hui-article">
    <article class="cl pd-20">
        <form action="?">
            <div class="text-l">
                <input type="text" name="title" placeholder="产品名称" value="{$Think.get.title|default=''}" style="width:250px" class="input-text">
                <span class="select-box size-M radius" style=" width: 8.33333%">
                <select name="category_id">
                    <option value="">文章分类</option>
                    {volist name="cate" id="vo"}
                    <option value="{$vo.id}" {eq name="Think.get.category_id" value="$vo['id']"} selected {/eq}>{$vo.level|str_repeat=' --- ', ###}{$vo.name}</option>
                    {/volist}
                </select>
                </span>
                <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜产品</button>
            </div>
        </form>
        <div class="cl pd-5 bg-1 bk-gray">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
                <a href="javascript:;" onclick="layer_show('添加文章','{:url("save_article")}','0','0')" class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe600;</i> 添加文章
                </a>
            </span>
            <span class="r">共有数据：<strong>{$data->total()}</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th width="25"><input type="checkbox" name="" value=""></th>
                    <th width="80">ID</th>
                    <th width="100">名称</th>
                    <th width="100">首页显示</th>
                    <th width="100">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="data" id="vo"}
                <tr class="text-c">
                    <td><input type="checkbox" value="{$vo.id}" name=""></td>
                    <td>{$vo.id}</td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.title}</u></td>
                    <td class="td-status">{$vo.index|get_list_index_status_html=$vo.id,'article'}</td>
                    <td class="td-manage">
                        <a title="编辑" href="javascript:;" onclick="layer_show('编辑品牌','{:url("save_article", ["id" => $vo['id'], "cid" => $vo['category_id']])}','0','0')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                        <a title="删除" data-href="{:url('common/save_model_field', ['id' => $vo['id'], 'field' => 'delete', 'value' => 1, 'model' => 'article'])}" class="ml-5 delete" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
        <div class="cl pd-5 bg-1 bk-gray tp5-page mt-20">
            {$data->render()}
        </div>
    </article>
</div>
{/block}